Sort Element of array on the basis of another array in lexical order by using just sort function